﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate;
using System.Collections;
using NHibernate.Cfg;
using NHibernate.Criterion;
using BVMB.DataLayer.Base;
using BVMB.DataLayer.BusinessObjects;
using BVMB.DataLayer.ManagerObjects;

namespace BVMB.Service.LapLichBay
{
    public class ChuyenBayService
    {
        public static IList<ChuyenBay> GetChuyenBay()
        {


            //ISessionFactory session = new NHibernate.Cfg.Configuration().Configure().BuildSessionFactory();
            IManagerFactory manager = new ManagerFactory();
            IChuyenBayManager tb = manager.GetChuyenBayManager();
           
            IList<ChuyenBay> list = tb.GetAll();
             //session.OpenSession().CreateSQLQuery("exec Se");
                                //.CreateCriteria("hv.ChuyenBay", "cb")
                                //.CreateCriteria("tb.ChuyenBays", "tb")
                                //.CreateCriteria("tb.SanBay1", "sb1")
                                //.CreateCriteria("tb.SanBay2", "sb2").List();

            return list;
        }
    }
}
